import request from '@/utils/http'

export class MaterialService {
	
	static getLoadAll(params:any) {
	  return request.post<any>({
	    url: '/visual/material/load/all',
		params
	  })
	}
	
	static save(params:any) {
	  return request.post<any>({
	    url: '/visual/material/save',
		params
	  })
	}
	
	static delete(id:string) {
	  	return request.del<any>({
	    	url: '/visual/material/detain/'+id,
	  	})
	}

	static imagePages(params:any) {
		return request.get<any>({
		  	url: '/visual/material/image/pages',
			params
		})
	}
	  
	static saveImage(data:FormData) {
		return request.post<any>({
		  url: '/visual/material/image/save',
		  headers: { "Content-Type": "multipart/form-data" },
			data
		})   
	}
	
	static deleteImage(id:string) {
		return request.del<any>({
		  url: '/visual/material/image/detain/'+id,
		})
	}
	
}

